import request from '../utils/request'
import config from '../config'
import wepy from 'wepy'

/*
 * 员工页接口
 * @author： 黄
 */

/*
 * @desc 获取员工列表
 * @param {number} shopid 分店id
 * @return {promise}
 */
async function getStaffList (filter) {
  filter = filter || []
  let userInfo = wepy.getStorageSync('userInfo')
  filter.shopid = filter.shopid || userInfo.departmentid
  return request(config.apiList.getStaffList, filter)
}

export {
  getStaffList
 }
